<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="w" uri="http://www.groupwareworkbench.org.br/widgets/commons" %>
<%@ taglib prefix="tag" uri="http://www.groupwareworkbench.org.br/widgets/tag" %>
<%@ taglib prefix="recommend" uri="http://www.groupwareworkbench.org.br/widgets/recommend" %>
<%@ taglib prefix="comment" uri="http://www.groupwareworkbench.org.br/widgets/comment" %>
<%@ taglib prefix="category" uri="http://www.groupwareworkbench.org.br/widgets/category" %>
<%@ taglib prefix="rating" uri="http://www.groupwareworkbench.org.br/widgets/rating" %>
<%@ taglib prefix="counter" uri="http://www.groupwareworkbench.org.br/widgets/counter" %>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta http-equiv="Cache-Control" content="no-cache">
        <title>Eureka</title>
        <link rel="shortcut icon" type="image/x-icon" href="${pageContext.request.contextPath}/images/favicon.ico" />
        <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/reset.css" />
        <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/tagcloud.css" />
        <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/aun.css" />
        <script type="text/javascript" src="${pageContext.request.contextPath}/js/listagem.js"></script>
        <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.js"></script>
        <tag:scriptTags />
    </head>
    <body>
        <w:topo collabletInstance="${knowledgeMgr.collablet}" />
        <w:conteudoPagina titulo="Eureka:">
            <br />
            <%-- TODO: Tableless! --%>
            <form name="dados" method="post" action="<c:url value="/groupware-workbench/knowledge/${knowledge.id}/updateRelated" />">
                <div>
                    <c:if test="${category1Mgr != null}">
	                    <div style="padding: 20px;"">
	                    <b>Projeto:</b>
	                    <category:showCategory entity="${knowledge}" categoryMgr="${category1Mgr}" />
                        </div>
                    </c:if>
                    <div style="padding: 20px;"">
                        <b>T&iacute;tulo:</b>
                        <br/>
                        <c:out value="${knowledge.title}" escapeXml="false" />
                    </div>
                    <div style="padding: 20px;">
                        <b>Causa:</b>
                        <br/>
                        <c:out value="${knowledge.cause}" escapeXml="false" />
                    </div>
                    <div style="padding: 20px;">
                        <b>Solução:</b>
                        <br/>
                        <c:out value="${knowledge.solution}" escapeXml="false" />
                    </div>
                    <c:if test="${category2Mgr != null}">
                        <div style="padding: 20px;"">
                            <b>Status:</b>
                            <category:showCategory entity="${knowledge}" categoryMgr="${category2Mgr}" />
                        </div>
                    </c:if>
                    <div style="padding: 20px;">
                        <b>Chave:</b>
                        <c:out value="${knowledge.chave}" />
                    </div>
                    <div>
                    <c:if test="${tagMgr != null}">
                        <tag:getTags tagMgr="${tagMgr}" entity="${knowledge}" showTitle="true" tagsClass="cloud5" />
                    </c:if>
                    <br/>
                    <br/>
                    <c:if test="${recommendMgr != null}">
                    <div class="titleClass">Relacionados:</div>
                        <recommend:simpleList entity="${knowledge}" recommendMgr="${recommendMgr}" />
                    </c:if>
                    <br/>
                    <br/>
                    <c:if test="${ratingMgr.collablet.enabled}">
                    <div class="titleClass">Avalie este documento:&nbsp;&nbsp;</div>
                        <rating:starRatingBar divId="rating1" entity="${knowledge}" ratingMgr="${ratingMgr}"/>
                    <div class="titleClass">Avalia&ccedil;&atilde;o geral:&nbsp;&nbsp;</div>
                        <rating:starRatingWithScore divId="rating2" entity="${knowledge}" ratingMgr="${ratingMgr}"/>
                    </c:if>
                    <br/>
                    <br/>
                    <c:if test="${counterMgr.collablet.enabled}">
                        <div>
                            <div class="titleClass">N&uacute;mero de visualiza&ccedil;&otilde;es:&nbsp;&nbsp;</div>
                            <div>
                                <counter:showCounter manager="${counterMgr}" entity="${knowledge}" viewer="${sessionScope.userLogin}" increment="true" wrapClass="counter_show" />
                            </div>
                        </div>
                    </c:if>
                    <br/>
                    <br/>
                    <c:if test="${counterMgr.collablet.enabled}">
                        <style type="text/css">
                            .bodyWidgetViwers {
                                border: none;
                                width: 300px;
                            }
                            .titleClass {
                                color: #2A6A96;
                                font-weight: bold;
                                
                            }
                            .viewers{
                                padding: 5px;
                            }
                        </style>
                        <counter:viewers manager="${counterMgr}" entity="${knowledge}" size="10" bodyWidgetClass="bodyWidgetViwers" titleClass="titleClass" lineClass="viewers" />
                    </c:if>

                    <br/>
                    <br/>
                    <c:if test="${commentMgr != null}">
                        <comment:getComments commentMgr="${commentMgr}" entity="${knowledge}" />
                        <comment:addComment commentMgr="${commentMgr}" idObject="${knowledge.id}" user="${sessionScope.userLogin}" />
                        <input type="submit" class="botao" value="Ok" />
                    </c:if>
                    </div>
                </div>
                <br />
                <br />
            </form>
            <div class="barra_botoes">
                <w:voltar collabletInstance="${knowledgeMgr.collablet}" />
            </div>
        </w:conteudoPagina>
    </body>
</html>